package com.boco.modules.fdoc.web.sigserverpack;

import java.util.Date;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import com.boco.common.web.ServletController;
import com.boco.modules.fdoc.model.SigServicepackEntity;
import com.boco.modules.fdoc.model.SigSvsPackDtlRlnEntity;
import com.boco.modules.fdoc.service.SigServicepackService;
import com.boco.modules.fdoc.vo.SigServicepackVo;

@Controller
@RequestMapping(value = "/sigserverpack")
public class DeleteSigSvsPackCtr extends ServletController{
	@Resource
	SigServicepackService sigServicepackService;
	
	@RequestMapping(value = "/deletSigSvsPackOrDtl",method = RequestMethod.POST)
	public String deleteSvsPack(SigServicepackVo vo, HttpServletRequest request, HttpServletResponse response,
			Model model) {
		int[] sigSvsPackIds=vo.getSigSvsPackIds();
		for(int sigSvsPackId:sigSvsPackIds){
			sigServicepackService.deleteSigSvsPack(sigSvsPackId);
			sigServicepackService.deleteSigSvsPackDtlRln(sigSvsPackId);
			
		}
		request.setAttribute("dteSigPackScs", "删除服务包成功！");
		return "/sigsvspack/dteSigPackScs";	
		}

}
